package com.wangwei.jvm.headertest;


import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

@RestController
public class TestController {

    List list = new ArrayList();

    @GetMapping("h1")
    public String h1() {
        return "hello";
    }

    @GetMapping("h2")
    public String h2() throws InterruptedException {
        while (true) {
            System.out.println("list.size():"+list.size());
            list.add(new byte[1024 * 1024]);
            Thread.sleep(100);
        }

        //return "hello";
    }
}
